package model.redpack;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @title 红包约束条件
 *
 */
public class OpenRedPackConstraint implements Parcelable {
    private long id;
    //约束名称 时间，地点，人物，故事，任务等 是否需要扫描二维码等
    private String name;
    //分类
    private long type;
    //具体内容  xx点之前获得

    private String msg;

    public OpenRedPackConstraint(String name, long type, String msg) {
        this.name = name;
        this.type = type;
        this.msg = msg;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public long getType() {
        return type;
    }

    public void setType(long type) {
        this.type = type;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(this.id);
        dest.writeString(this.name);
        dest.writeLong(this.type);
        dest.writeString(this.msg);
    }

    public OpenRedPackConstraint() {
    }

    protected OpenRedPackConstraint(Parcel in) {
        this.id = in.readLong();
        this.name = in.readString();
        this.type = in.readLong();
        this.msg = in.readString();
    }

    public static final Creator<OpenRedPackConstraint> CREATOR = new Creator<OpenRedPackConstraint>() {
        @Override
        public OpenRedPackConstraint createFromParcel(Parcel source) {
            return new OpenRedPackConstraint(source);
        }

        @Override
        public OpenRedPackConstraint[] newArray(int size) {
            return new OpenRedPackConstraint[size];
        }
    };
}
